


import 'package:flutter/material.dart';

main()=> runApp(CLMyapp());

class CLMyapp extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return MaterialApp(
        home: CLhome()
    );
  }
}
class CLhome extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build

    return Scaffold(
        appBar: AppBar(
          title:Text("图片列表") ,
        ),
        body: CLbody()
    );
  }
}
class CLbody extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return ListView(
      children: [
        CLbox("one","古代的织布机","http://photocq.photo.store.qq.com/psc?/V11Gqipz2IIiuN/UJ0ftVJULiGAYqy0z7L2FhPykXP6T6kuxYDiggULBgg4wIBHABhttqzf*vf4NpOMajz6Lq.U7EuJ4Rs4eCWtng!!/mnull&bo=OASgBQAAAAARB6k!&rf=photolist&t=5"),
        const SizedBox(height: 8,),
        CLbox("two","刀子","http://photocq.photo.store.qq.com/psc?/V11Gqipz2IIiuN/UJ0ftVJULiGAYqy0z7L2Flvonzgelz59PZ5MMCPonD9u1mdGObWvdm.VKhjjRQjljvqgUPVJPWc9Jp6RBzo6MQ!!/mnull&bo=OASgBQAAAAARB6k!&rf=photolist&t=5"),
        const SizedBox(height: 8,),
        CLbox("three","衣服","http://photocq.photo.store.qq.com/psc?/V11Gqipz2IIiuN/UJ0ftVJULiGAYqy0z7L2Foc04CXYlnSuiKazDRx6Rilx7l1EEW*E9PRC*Uu3F5XlknI8l*3K1MnLUNR7Fo5H2Q!!/mnull&bo=OASgBQAAAAARB6k!&rf=photolist&t=5")
      ],
    );
  }
}

class CLbox extends StatelessWidget {
  String list;
  String content;
  String url;
  final style1=TextStyle(fontSize: 30,color: Colors.orange);

  CLbox(this.list,this.content,this.url);
  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.all(12),
      decoration: BoxDecoration(border: Border.all(
          width: 5,
          color: Colors.grey
      )),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.center,//默认为center
        children: [
          Text(list, style:style1,),
          Text(content),
          const SizedBox(height: 8,),
          Image.network(url)
        ],
      ),
    );
  }
}
